// Tilt.h

#ifndef __TILT_H__
#define __TILT_H__

#include "audioeffectx.h"
#include "TiltProcess.h"

namespace RBarreiros {
	enum
	{
		kParamActive = 0,
		kParamFrequency,
		kParamGain,
		kParamCount
	};
	
	class Tilt : public AudioEffectX
	{

	public:
		Tilt(audioMasterCallback audioMaster);
		~Tilt() {}

		// Processes
		void processReplacing(float **inputs, float **outputs, VstInt32 sampleFrames);
		void processDoubleReplacing(double **inputs, double **outputs, VstInt32 sampleFrames);

		// Parameters
		virtual void setParameter(VstInt32 index, float value);
		virtual float getParameter(VstInt32 index);

		virtual float getParameterDefault(VstInt32 index);
		virtual float getParameterFromString(VstInt32, char *text);

		virtual void getParameterLabel(VstInt32 index, char *label);
		virtual void getParameterDisplay(VstInt32 index, char *text);
		virtual void getParameterName(VstInt32 index, char *text);

		virtual void getProgramName(char *name);
		virtual void setProgramName(char *name);

		virtual void setSampleRate(float sampleRate);
		virtual void setProgram(VstInt32 program);

		virtual bool getEffectName(char *name);
		virtual bool getVendorString(char *text);
		virtual bool getProductString(char *text);
		virtual VstInt32 getVendorVersion() { return 1000; }
		virtual VstPlugCategory getPlugCategory() { return kPlugCategEffect; }

	protected:
		float params[kParamCount];
		char programName[kVstMaxProgNameLen+1];
		TiltProcess<Tilt> tp;
	};
}

#endif //  __TILT_H__